package cn.echo.ecc.dto;

import cn.echo.ecc.util.AssertUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegisterDto {

    @Pattern(regexp = AssertUtil.PHONE_PATTERN,message = "手机号码格式不正确")
    private String phone;

    @Size(message = "密码长度应该在6~12位",min = 6,max = 12)
    private String password;;

    @NotNull
    private String smsCode;

    @NotNull
    private Integer regChannel;


    private String recommendCode;

}
